package com.fowo.api.model.purchase.change.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 变更单 导入导出辅助模型 */
@Getter
@Setter
public class PurchaseChangeOrderExcelPo {

  @NotNull(message = "变更单号不能为空")
  @Size(max = 50, message = "变更单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*变更单号")
  private String cOrderSn;

  @Size(max = 50, message = "联系人长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "联系人")
  private String contactPerson;

  @Size(max = 50, message = "联系方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "联系方式")
  private String contactNumber;

  @Size(max = 50, message = "结算方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算方式")
  private String settlementMethod;

  @ExcelProperty(value = "预付比例")
  private java.math.BigDecimal advanceRatio;

  @Size(max = 50, message = "结算描述长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算描述")
  private String settlementDescribe;

  @Size(max = 50, message = "支付方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "支付方式")
  private String paymentMethod;

  @Size(max = 50, message = "采购币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购币种")
  private String purchaseCurrency;

  @Size(max = 50, message = "运费长度不能超过20")
  @ExcelProperty(value = "运费")
  private java.math.BigDecimal shippingPrice;

  @ExcelProperty(value = "其他费用")
  private java.math.BigDecimal otherFee;

  @EnumsString(
    value = { "不分配", "按金额", "按数量" },
    message = "费用分配方式的可用值为 “不分配”, “按金额”, “按数量” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "费用分配方式")
  private String feePartType;

  @EnumsString(
    value = { "否", "是" },
    message = "含税的可用值为 “否”, “是” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "含税")
  private String includingTax;

  @Size(max = 50, message = "采购员长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员")
  private String optUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员")
  private Long optUid;

  @Size(max = 50, message = "采购方长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购方")
  private String purchaserName;

  @ExcelIgnore
  @ExcelProperty(value = "采购方")
  private Long purchaser;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "下单时间")
  private java.util.Date orderTime;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "数量")
  private String quantity;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "金额")
  private String amount;

  @EnumsString(
    value = { "已驳回", " 待审核", "已处理" },
    message = "状态的可用值为 “已驳回”, “ 待审核”, “已处理” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "状态")
  private String status;

  @EnumsString(
    value = { "普通采购" },
    message = "采购类型的可用值为 “普通采购” 其中之一"
  )
  @Size(max = 50, message = "采购类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购类型")
  private String purchaseType;

  @EnumsString(
    value = { "仓库质检", "预检", "免检" },
    message = "质检类型的可用值为 “仓库质检”, “预检”, “免检” 其中之一"
  )
  @Size(max = 50, message = "质检类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "质检类型")
  private String inspectionType;

  @NotBlank(message = "采购单号不能为空")
  @Size(max = 50, message = "采购单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*采购单号")
  private String orderSn;

  @EnumsString(
    value = { "入库后付款", "入库号一个月付款" },
    message = "结算账期的可用值为 “入库后付款”, “入库号一个月付款” 其中之一"
  )
  @Size(max = 50, message = "结算账期长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "结算账期")
  private String closingPeriod;

  @Size(max = 50, message = "变更单备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "变更单备注")
  private String remarks;

  @Size(max = 50, message = "运费币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "运费币种")
  private String shippingCurrency;

  @Size(max = 50, message = "其他费用币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "其他费用币种")
  private String otherCurrency;

  @ExcelProperty(value = "汇率")
  private java.math.BigDecimal rate;

  @Size(max = 50, message = "货币币种长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "货币币种")
  private String currencyName;

  @ExcelIgnore
  @ExcelProperty(value = "货币币种")
  private Long currency;

  @ExcelProperty(value = "旧金额")
  private java.math.BigDecimal oldAmount;

  @ExcelProperty(value = "旧数量")
  private Integer oldquantity;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "变更创建人")
  private String creatorOpName;

  @ExcelIgnore
  @ExcelProperty(value = "变更创建人")
  private Long creatorOp;
}
